package gov.child.service.impl;

import gov.child.dao.AjaxDao;
import gov.child.dao.impl.AjaxDaoImpl;
import gov.child.service.AjaxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author fzh
 * @since 2017/9/20
 */
@Service("ajaxService")
public class AjaxServiceImpl implements AjaxService {

    @Autowired
    private AjaxDao ajaxDao;

    @Override
    public boolean findUsernameFromUser(String username) {
        Object o = ajaxDao.findUsernameFromUser(username);
        return o != null;
    }

    @Override
    public boolean findPhoneFromUser(String phone) {
        Object o = ajaxDao.findPhoneFromUser(phone);
        return o != null;
    }

}
